<template>
  <h3>点击按钮添加多个组件</h3>
  <div v-for="(d,index) of counter" :key="index">
    <t-card :title="title" :bordered="false" hover-shadow :style="{ width: '400px' }">
      {{ d }}
    </t-card>
  </div>
  <t-button theme="primary" @click="clickHandler">添加空间</t-button>
</template>
<script setup lang="ts">
import {ref} from "vue";

const counter = ref([])
const title = ref('标题哈哈哈哈哈')
let couterNum = ref(1)

function clickHandler() {
  console.log("点击了按钮")
  counter.value.push("好的"+couterNum)
  couterNum++
}
</script>